import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton
from PyQt5.QtCore import pyqtSlot

@pyqtSlot()
def func_clicked():
    print("按键按下")
    
def init_weight(w: QWidget):
    w.setWindowTitle("钢铁侠变身")
    w.resize(640, 480)
    
    btn = QPushButton("变身")
    btn.setText("铠甲合体")
    
    btn.clicked.connect(func_clicked)
    
    btn.clicked.connect(lambda: print("变身"))
    
    btn.clicked.connect(QApplication.quit)
    
    btn.setParent(w)
    
if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = QWidget()
    init_weight(w)
    w.show()
    sys.exit(app.exec_())
